#ifndef NIV2_H
#define NIV2_H
#include "niv3.h"
#include <net/ethernet.h>
#include <net/if_arp.h>
#include <netinet/in.h>
#include <netinet/ether.h>
#include <net/if.h>
#include <pcap/pcap.h>
#include <time.h>

void print(u_char *user, const struct pcap_pkthdr *h, const u_char *buff);
void printARP(const u_char* buff);

#define ETHERTYPE_EAP 0x888e

struct arphdr2
{
    unsigned short int ar_hrd;      /* Format of hardware address.  */
    unsigned short int ar_pro;      /* Format of protocol address.  */
    unsigned char ar_hln;       /* Length of hardware address.  */
    unsigned char ar_pln;       /* Length of protocol address.  */
    unsigned short int ar_op;       /* ARP opcode (command).  */
    unsigned char __ar_sha[ETH_ALEN];   /* Sender hardware address.  */
    unsigned char __ar_sip[4];      /* Sender IP address.  */
    unsigned char __ar_tha[ETH_ALEN];   /* Target hardware address.  */
    unsigned char  __ar_tip[4];      /* Target IP address.  */
};


#endif
